
package com.starshineworks.util.actions;

import com.starshineworks.entities.*;
import com.starshineworks.util.FileUploader;
import java.util.Map;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class ActionSubmitRequest extends Action {  
       
    @Override
    public boolean perform(HttpServletRequest  request, 
                           HttpServletResponse resp,
                           HttpServlet         serv, 
                           boolean             isMultiPart)
    {            
        boolean done = false;
        String next = "Admin";
        Map<String,String[]> map = request.getParameterMap();
        HttpSession sess = request.getSession();
        if (sess != null) {
            Integer uId = (Integer)sess.getAttribute("uId");
            Integer tId = (Integer)sess.getAttribute("tId");
            if (uId != null && tId != null) {                 
                RequestE.create1(uId, tId, map);
                return true;
            }
        }
        return false;
    }
    
    @Override
    public String getNextPage() {
        return "ManageTeams";
    }

    @Override
    public String getError() {
        return "Request could not be submitted.";
    }

}

